package com.diaosidadui;

import com.diaosidadui.domain.Student;

import java.lang.reflect.Array;
import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        Student stu1 = new Student("张三",23);
        Student stu2 = new Student("李四",24);
        Student stu3 = new Student("王五",25);
        Student stu4 = new Student("赵六",26);
        ArrayList<Student> arrList = new ArrayList<>();

        arrList.add(stu1);
        arrList.add(stu2);
        arrList.add(stu3);
        arrList.add(stu4);
        for (int i = 0; i < arrList.size(); i++) {
            Student stu =arrList.get(i);
            System.out.println(stu.getName()+"..."+stu.getAge());
        }


    }

}

